import Button from "components/Base/Button";
import Icon from "components/Base/Icon";
import DataTable from "components/Base/DataTable";
import {getBpDeviceType} from "../../../../models/deviceType";
import moment from "moment";

export default (self) => [

  {
    title: 'id',
    name: 'id',
    formItem: {
      type: 'hidden'
    },
  },
  {
    title: '设备ID',
    name: 'deviceId',
    tableItem: {
      align: 'center',
    },
    formItem: {
      rules: [
        {
          required: true,
          message: '请输入设备ID'
        }
      ]
    },
  },
  {
    title: '病人Id',
    name: 'patientId',
    tableItem: {
      align: 'center',
    },
    formItem: {}
  },
  {
    title: '收缩压',
    name: 'sbp',
    tableItem: {
      align: 'center',
    },
    formItem: {
      rules: [
        {
          required: true,
          message: '请输入sbp'
        }
      ]
    },
  },
  {
    title: '舒张压',
    name: 'dbp',
    tableItem: {
      align: 'center',
    },
    formItem: {
      rules: [
        {
          required: true,
          message: '请输入dbp'
        }
      ]
    },
  },
  {
    title: '心率',
    name: 'heart',
    tableItem: {
      align: 'center',
    },
    formItem: {
      rules: [
        {
          required: true,
          message: '请输入heart'
        }
      ]
    },
  },

  {
    title: '时间',
    name: 'time',
    tableItem: {
      sorter: true,
      align: 'center',
    },
    formItem: {
      type: 'date',
      showTime: true,
      initialValue: moment(),
      rules: [
        {
          required: true,
          message: '请输入date'
        }
      ]
    },
  },
  // {
  //   title: '操作',
  //   tableItem: {
  //     width: 180,
  //     align: 'center',
  //     render: (text, record) => (
  //       <DataTable.Oper>
  //         <Button tooltip="修改" onClick={e => self.onUpdate(record)}>
  //           <Icon type="edit"/>
  //         </Button>
  //         <Button tooltip="删除" onClick={e => self.onDelete(record)}>
  //           <Icon type="trash"/>
  //         </Button>
  //       </DataTable.Oper>
  //     )
  //   }
  // }
]
